import request from "@/utils/request.js";

/**
 * 获取所有酒店信息
 * @param int id
 * 
 */
export function hotelRecommend(params) {
	return request.get(`/index/product/hotel/4?`, params, {
		noAuth: true
	});
}

// 获取酒店详情
export function hotelDetail(id) {
	return request.get(`/product/detail/${id}?type=normal`,{}, {
		noAuth: true
	});
}

// 上传酒店数据生成预下订单
export function hotelPreOrder(params) {
	return request.post(`/order/hotel/pre/order`,params, {
		noAuth: false
	});
}

// 获取预订单信息
export function hotelPreOrderInfo(preOrderNo) {
	return request.get(`/order/hotel/load/pre/${preOrderNo}`,{}, {
		noAuth: false
	});
}

// 获取订单列表
export function hotelPreOrderList(params) {
	return request.get(`order/hotel/list?type=1`,params, {
		noAuth: false
	});
}


// 创建订单

export function hotelCreateOrder(params) {
	return request.post(`order/hotel/create`,params, {
		noAuth: false
	});
}